#include <iostream>

using namespace std;

void pingfen(void);

int main(void)
{
	pingfen();

	return 0;
}

void pingfen(void)
{
	int i;
	double fen[10];
	double max, min;
	double sum;
	double pj;

	cout << "pingwei" << 1 << ": ";
        cin >> fen[0];

	max = fen[0];
	min = fen[0];
	sum = fen[0];

	for(i = 1; i < 10; i ++)
	{
		cout << "pingwei" << i + 1 << ": ";
		cin >> fen[i];
		if(fen[i] > max)
			max = fen[i];
		if(fen[i] < min)
			min = fen[i];
		sum += fen[i];	
	}

	pj = (sum - max - min) / 8;

	cout << "平均值为" << pj << endl;
}
